package com.jiyun.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Transient;
import java.util.Date;

/**
 * @projectName: day06_gengjiajun_p11
 * @package: com.jiyun.common.model.train
 * @className: Train
 * @author: 耿嘉军
 * @date: 2023/8/14 16:04
 * @version: 1.0
 */
@Data
@ToString
public class Train {

    /**
     * 培训
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String name;
    private String photo;
    private Integer num;
    private String plan;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date overTime;
    private String paix;
    private String state;
    private String person;
    private String plids;

    @Transient
    @TableField(exist = false)
    private String tagIds;
    @Transient
    @TableField(exist = false)
    private String playIds;
    @Transient
    @TableField(exist = false)
    private String courseIds;

    @Transient
    @TableField(exist = false)
    private Integer countCourse;

    @Transient
    @TableField(exist = false)
    private Integer countPaper;

    @Transient
    @TableField(exist = false)
    private Integer countPlay;

}
